<?php
/*
* Sets the retire form with program current values
*/

function setRetireProgramForm($currentValues){
	//echo $currentValues['nume_program'] ;
	$retire_program_form = array(
	#----------------------------------------------------------------------
	#						Tabel										  |
	#----------------------------------------------------------------------
			  
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Nume program',
			  'post_name' 			=> 'program_name',
			  'field_size' 			=> 40,
			  'readonly'			  => true,
			  'current_value'		 => $currentValues['nume_program'],
			  'max_length' 			=> 100),
			  
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Cod COR/Nomenclator',
			  'post_name' 			=> 'cod',
			  'field_size' 			=> 40,
			  'readonly'			  => true,
			  'current_value'		 => $currentValues['cod'],
			  'max_length' 			=> 100),		
			  
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Tip program',
			  'post_name' 			 => 'tip_program',
			  'field_size' 			=> 40,
			  'readonly'			  => true,
			  'max_length' 			=> 100,
			  'current_value'		 => $currentValues['tip_program'],
			  'current_value'		 => 'opt1'),
									
						
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Serie autorizatie',
			  'post_name' 			 => 'serie_autorizatie',
			  'field_size' 			=> 40,
			  'readonly'			  => true,
			  'current_value'		 => $currentValues['serie_autorizatie'],
			  'max_length' 			=> 100),
			  
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Nr. autorizatie program',
			  'post_name' 			 => 'nr_autorizatie_program',
			  'field_size' 			=> 40,
			  'readonly'			  => true,
			  'current_value'		 => $currentValues['nr_autorizatie_program'],
			  'max_length' 			=> 100),
			  
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Data autorizatie program',
			  'post_name' 			 => 'data_autorizatie_program',
			  'field_size' 			=> 40,
			  'readonly'			  => true,
			  'current_value'		 => $currentValues['data_autorizatie_program'],
			  'max_length' 			=> 100),
			  
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Nr. retragere autorizatie',
			  'post_name' 			=> 'nr_retragere_autorizatie',
			  'placeholder'          => 'Numar retragere',
			  'title'				=> 'Numar retragere',
			  'regex'				=> '/^[0-9]*$/',
			  'errors' 				=> array(
											'empty_field_or_no_selection_error' => 'Introduceti un numar de retragere al autorizatiei<br />',
											'no_regex_pattern_found_error' => 'Introduceti un numar valid de retragere al autorizatiei <br />' ),
			  'field_size' 			=> 40,
			  'max_length' 			=> 100),
			 
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Data retragere autorizatie',
			  'post_name' 			=> 'data_retragere_autorizatie',
			  'placeholder'          => 'AAAA-LL-ZZ',
			  'title'				=> 'An-Luna-Zi',
			  'validation_function'   => 'dateLTEToday',
			  'regex'				=> '/^[1-2][0-9]{3}-(0[1-9]|10|11|12)-(0[1-9]|[1-2][0-9]|3[0-1])$/',
			  'errors' 				=> array(
											'empty_field_or_no_selection_error' => 'Introduceti o data de retragere a autorizatiei<br />',
											'no_regex_pattern_found_error' => 'Introduceti o data valida de retragere a autorizatiei<br />' ),
			  'field_size' 			=> 40,
			  'max_length' 			=> 100),
			
		array('field_type' 			=> 'text',
			  'field_display_name' 	=> 'Motiv retragere autorizatie',
			  'post_name' 			=> 'motiv_retragere_autorizatie',
			  'placeholder'          => 'Motiv retragere autorizatie',
			  'field_size' 			=> 40,
			  'can_be_null'			=> true,
			  'max_length' 			=> 100)
			  
	);	
	
	return $retire_program_form;
}
?>